#include "task_audio_test.h"
#include "task_audio.h"
#include "string.h"
#include "FreeRTOS.h"
#include "task.h"

void taskAudioTest(void * pData)
{
    AudioMail mail;
    while(1)
    {
        
        vTaskDelay(2000/portTICK_RATE_MS);

        playFile("atti.wav", 1);

        vTaskDelay(1000/portTICK_RATE_MS);
        playFile("batlow.wav",1);
        
        playBeep(4000, 200, 0);
        
        //mail.prim =PRIM_AUDIO_PLAY_FILE;
        //strcpy(mail.data.name, "atti.wav");
        //xQueueSend(queueAudio, &mail, 100);
        
        //mail.prim =PRIM_AUDIO_PLAY_FILE;
        //strcpy(mail.data.name, "batcrit.wav");
        //xQueueSend(queueAudio, &mail, 100);

        //mail.prim =PRIM_AUDIO_PLAY_FILE;
        //mail.volume =4;
        //strcpy(mail.data.name, "batlow.wav");
        //xQueueSend(queueAudio, &mail, 100);

        //mail.prim =PRIM_AUDIO_PLAY_FILE;
        //mail.volume =4;
        //strcpy(mail.data.name, "camcenter.wav");
        //xQueueSend(queueAudio, &mail, 100);

        //mail.prim =PRIM_AUDIO_PLAY_BEEP;
        //mail.data.beep.freq =400;
        //mail.data.beep.duaration =1500;
        //mail.volume =2;
        //xQueueSend(queueAudio, &mail, 100);

        //vTaskDelay(500/portTICK_RATE_MS);
        //mail.prim =PRIM_AUDIO_PLAY_BEEP;
        //mail.data.beep.freq =500;
        //mail.data.beep.duaration =500;
        //mail.volume =2;
        //xQueueSend(queueAudio, &mail, 100);

        //vTaskDelay(500/portTICK_RATE_MS);
        //mail.prim =PRIM_AUDIO_PLAY_BEEP;
        //mail.data.beep.freq =600;
        //mail.data.beep.duaration =1500;
        //mail.volume =2;
        //xQueueSend(queueAudio, &mail, 100);

    }
}


